package cn.sc.jedis.serialization;

import java.util.List;
import java.util.Map;
import java.util.Set;


/**
 * @ClassName StringSerialization
 * @Author 谢卓才
 * @Description 序列化操作
 * @Date 2022/11/13 9:17
 */
public interface Serialization {

    byte[] packObject(Object data) ;

    <V> Map<byte[],byte[]> packObjectMap(Map<String,V> data) ;

    byte[] packString(String data);

    byte[][] packStringMulti(String... data);

    byte[][] packObjectMulti(String... data);

    <V> V dismantleObject(byte[] data);

    String dismantleString(byte[] data);

    List<String> dismantleStringMulti(List<byte[]> data);

    Set<String> dismantleStringMulti(Set<byte[]> data);

    <V> List<V> dismantleMulti(List<byte[]> data);

    <V> Map<String, V> dismantleMap(Map<byte[], byte[]> data);
}
